<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport"
          content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"/>
    <title></title>
    <script src="./js/LiteJS/Lite.js" type="text/javascript"></script>
</head>

<body>
<div class="mui-content" id="container">
    <div class="mui-input-row mui-search">
        <input type="search" class="mui-input-clear" placeholder="点击搜索">
    </div>
    <div class="mui-slider">
        <div class="mui-slider-group mui-slider-loop">
            <!-- 额外增加的一个节点(循环轮播：第一个节点是最后一张轮播) -->
            <div class="mui-slider-item mui-slider-item-duplicate">
                <a href="#">
                    <img class="slide_img" src="./images/file_icon_03.png">
                </a>
            </div>
            <!--第一个内容区容器-->
            <div class="mui-slider-item">
                <a href="#">
                    <img class="slide_img" src="./images/file_icon_01.png">
                </a>
            </div>
            <!--第二个内容区-->
            <div class="mui-slider-item">
                <a href="#">
                    <img class="slide_img" src="./images/file_icon_02.png">
                </a>
            </div>
            <!--第二个内容区-->
            <div class="mui-slider-item">
                <a href="#">
                    <img class="slide_img" src="./images/file_icon_03.png">
                </a>
            </div>
            <!-- 额外增加的一个节点(循环轮播：最后一个节点是第一张轮播) -->
            <div class="mui-slider-item mui-slider-item-duplicate">
                <a href="#">
                    <img class="slide_img" src="./images/file_icon_01.png">
                </a>
            </div>
        </div>
        <div class="mui-slider-indicator">
            <div class="mui-indicator mui-active"></div>
            <div class="mui-indicator"></div>
            <div class="mui-indicator"></div>
            <div class="mui-indicator"></div>
        </div>
    </div>
</div>
<script src="./js/common.js" type="text/javascript"></script>
<script type="text/javascript">
    /**
     *
     * @private
     */
    function _callback() {
        //mui初始化
        mui.ready(function () {
            var gallery = mui('.mui-slider');
            gallery.slider({
                interval: 2000//自动轮播周期，若为0则不自动播放，默认为0；
            });
            mui(".mui-scroll-wrapper").scroll({
                bounce: true //是否启用回弹
            });
            document.querySelector(".mui-search").addEventListener("click",function () {
               window.location.href = context_path+"/search.html";
            });
            //3、退出系统时，默认还是加载初始化的页面，自定义事件，模拟点击“首页选项卡”
            document.addEventListener('go_home', function () {
                var defaultTab = document.getElementById("defaultTab");
                //模拟首页点击
                mui.trigger(defaultTab, 'click');
                //切换选项卡高亮
                var current = document.querySelector(".mui-bar-tab>.mui-tab-item.mui-active");
                if (defaultTab !== current) {
                    current.classList.remove('mui-active');
                    defaultTab.classList.add('mui-active');
                }
            });
        });
    }
</script>
</body>
</html>